﻿using Architecture.Api.Application.Commands.DeepProcessingCommand;
using Architecture.Domain.Services.Interface;
using MediatR;

namespace Architecture.Api.Application.CommandHandlers.DeepProcessingHandler
{
    public class DeepProcessingCorporationBatchPicListCommandHandler : IRequestHandler<DeepProcessingCorporationBatchPicListCommand, int>
    {

        private readonly IDeepProcessingService _deepProcessingService;

        public DeepProcessingCorporationBatchPicListCommandHandler(IDeepProcessingService deepProcessingService)
        {
            _deepProcessingService = deepProcessingService;
        }

        public async Task<int> Handle(DeepProcessingCorporationBatchPicListCommand request, CancellationToken cancellationToken)
        {
            return await _deepProcessingService.BatchCorporationPicList(request.productionLot, request.urlImg, request.dpId);
        }
    }
}